CREATE EXTERNAL TABLE jms_dm.dm_sqs_abnormal_to_pdd_hi(
  waybill_no string COMMENT '运单号', 
  scan_type string COMMENT '扫描类型', 
  scan_time timestamp COMMENT '扫描时间', 
  network_code string COMMENT '网点编码', 
  network_name string COMMENT '网点名称', 
  abnormal_causes string COMMENT '异常原因', 
  create_time timestamp COMMENT '创建时间', 
  estimate_time timestamp COMMENT '异常事件结束时间(预计解决时间)', 
  network_type_desc string COMMENT '事件来源', 
  first_type string COMMENT '一级事件类型', 
  second_type string COMMENT '二级事件类型'
)
COMMENT '异常新对接桃花岛'
PARTITIONED BY ( dt string COMMENT '时间分区 yyyy-mm-dd-HH')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_sqs_abnormal_to_pdd_hi'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');

-----异常类型映射表 只涉及这个需求
CREATE EXTERNAL TABLE jms_tmp.tmp_abnormal_type_relat(
  jt_abnormal_type string COMMENT 'JT异常类型', 
  one_level_express_status string COMMENT '一级物流状态', 
  two_level_express_status string COMMENT '二级物流状态', 
  desc_info string COMMENT '描述')
COMMENT '异常类型映射表'
stored as parquet
LOCATION '/dw/hive/jms_tmp.db/external/tmp_abnormal_type_relat'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
